//
//  QZHSearchBar.m
//  LiveStar
//
//  Created by 漪珊 on 2016/12/14.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "QZHSearchBar.h"

@implementation QZHSearchBar

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI {
    self.layer.cornerRadius = 3;
    self.clipsToBounds = YES;
    self.backgroundColor = [UIColor whiteColor];
    self.font = UIFont(14);
    UIImageView *searchIcon = [[UIImageView alloc] init];
    searchIcon.image = [UIImage imageNamed:@"seach_small"];
    searchIcon.contentMode = UIViewContentModeCenter;
    searchIcon.size = CGSizeMake(30, 30);
    self.leftView = searchIcon;
    self.leftViewMode = UITextFieldViewModeAlways;
}

@end
